package com.uit.ecommerce.services;

import com.uit.ecommerce.bo.AreaBO;
import com.uit.ecommerce.bo.CityBO;
import com.uit.ecommerce.bo.CountryBO;
import com.uit.ecommerce.dto.AreaDTO;
import com.uit.ecommerce.dto.CityDTO;
import com.uit.ecommerce.dto.CountryDTO;
import java.util.ArrayList;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;

@WebService()
public class ServiceLocation {

    /**
     * Web service operation
     */
    @WebMethod(operationName = "getAllArea")
    public ArrayList<AreaDTO> getAllArea() throws Exception {
        AreaBO AB=new AreaBO();
       return AB.getAllArea();
    }
    /**
     * Web service operation
     */
    @WebMethod(operationName = "getAllAreaByCountryId")
    public ArrayList<AreaDTO> getAllAreaByCountryId(@WebParam(name = "CountryId")
    String CountryId) throws Exception {
         AreaBO AB=new AreaBO();
       return AB.getAllAreaByCoutryCode(CountryId);
    }

    /**
     * Web service operation
     */
    @WebMethod(operationName = "getAreaInfoById")
    public AreaDTO getAreaInfoById(@WebParam(name = "Id")
    String Id) throws Exception {
        AreaBO AB=new AreaBO();
       return AB.getAreaByID(Id);
    }

    /**
     * Web service operation
     */
    @WebMethod(operationName = "getAreaInfoByName")
    public AreaDTO getAreaInfoByName(@WebParam(name = "Name")
    String Name) throws Exception {
        AreaBO AB=new AreaBO();
       return AB.getAreaByName(Name);
    }

    /**
     * Web service operation
     */
    @WebMethod(operationName = "getAllCountry")
    public ArrayList<CountryDTO> getAllCountry() throws Exception {
        CountryBO CB=new CountryBO();
        return CB.getAllCountry();
    }

    /**
     * Web service operation
     */
    @WebMethod(operationName = "getCountryById")
    public CountryDTO getCountryById(@WebParam(name = "Id")
    String Id) throws Exception {
       CountryBO CB=new CountryBO();
        return CB.getCountryById(Id);
    }

    /**
     * Web service operation
     */
    @WebMethod(operationName = "getCountryByName")
    public CountryDTO getCountryByName(@WebParam(name = "name")
    String name) throws Exception {
       CountryBO CB=new CountryBO();
        return CB.getCountryById(name);
    }

    /**
     * Web service operation
     */
    @WebMethod(operationName = "getAllCity")
    public ArrayList<CityDTO> getAllCity() throws Exception {
        CityBO CB=new CityBO();
        return CB.GetAllCity();
    }

    /**
     * Web service operation
     */
    @WebMethod(operationName = "getCityByID")
    public CityDTO getCityByID(@WebParam(name = "Id")
    String Id) throws Exception {
        CityBO CB=new CityBO();
        return CB.getCityByID(Id);
    }

    /**
     * Web service operation
     */
    @WebMethod(operationName = "getCityByName")
    public CityDTO getCityByName(@WebParam(name = "Name")
    String Name) throws Exception {
        CityBO CB=new CityBO();
        return CB.getCityByName(Name);
    }

    /**
     * Web service operation
     */
    @WebMethod(operationName = "getAllCityByAreaCode")
    public ArrayList<CityDTO> getAllCityByAreaCode(@WebParam(name = "AreaCode")
    String AreaCode) throws Exception {
       CityBO CB=new CityBO();
        return CB.GetAllCityByAreaCode(AreaCode);
    }

    /**
     * Web service operation
     */
    @WebMethod(operationName = "getAllAreaByCountryName")
    public ArrayList<AreaDTO> getAllAreaByCountryName(@WebParam(name = "Country")
    String Country) throws Exception {
       AreaBO AB=new AreaBO();
       return AB.getAllAreaByCoutryName(Country);
    }

    /**
     * Web service operation
     */
    @WebMethod(operationName = "getAllCityByAreaName")
    public ArrayList<CityDTO> getAllCityByAreaName(@WebParam(name = "Area")
    String Area) throws Exception {
      CityBO CB=new CityBO();
        return CB.GetAllCityByAreaName(Area);
    }
   

}
